package main

import (
	"fmt"
	"io"
	"os"
)

func main() {
	file, err := os.Open("./test.txt")
	defer file.Close()
	if err != nil {
		fmt.Println(err)
	}
	data := make([]byte, 128)
	totaldata := make([]byte, 0)
	for {
		n, err := file.Read(data)

		if err == io.EOF {
			break
		}
		totaldata = append(totaldata, data[:n]...)
	}
	fmt.Print(string(totaldata))
}
